<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>go-admin-auth</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Font Awesome -->
    <link rel="stylesheet" href="../AdminLTE-3.0.5/plugins/fontawesome-free/css/all.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="../AdminLTE-3.0.5/dist/css/adminlte.min.css">
    <link rel="stylesheet" href="../static/css/optimization.css">
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <!-- Navbar -->
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <!-- Left navbar links -->
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="/themes/default/admin/index.html" class="nav-link">主页</a>
            </li>
        </ul>


        <!-- Right navbar links -->
        <ul class="navbar-nav ml-auto">
            <!-- Messages Dropdown Menu -->

            <!-- Notifications Dropdown Menu -->
            <li class="nav-item">
                    <a href="/admin-api/v1/token" class="dropdown-item dropdown-footer"
                       onclick="logout(this);"
                       >退出登录</a>
            </li>
        </ul>
    </nav>
    <!-- /.navbar -->

    <!-- Main Sidebar Container -->
    <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <!-- Brand Logo -->
        <a href="#" class="brand-link">
            <img src="../AdminLTE-3.0.5/dist/img/AdminLTELogo.png"
                 alt="AdminLTE Logo"
                 class="brand-image img-circle elevation-3"
                 style="opacity: .8">
            <span class="brand-text font-weight-light">go-admin-auth</span>
        </a>

        <!-- Sidebar -->
        <div class="sidebar">
            <!-- Sidebar user (optional) -->

            <!-- Sidebar Menu -->
            <nav class="mt-2">
                <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                    data-accordion="false">
                    <!-- Add icons to the links using the .nav-icon class
                         with font-awesome or any other icon font library -->
                    <li class="nav-header" id="sidebar-menu"></li>
                </ul>
            </nav>
            <!-- /.sidebar-menu -->
        </div>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>操作管理</h1>
                    </div>
                    <!--                    <div class="col-sm-6">-->
                    <!--                        <ol class="breadcrumb float-sm-right">-->
                    <!--                            <li class="breadcrumb-item"><a href="#">Home</a></li>-->
                    <!--                            <li class="breadcrumb-item active">General Form</li>-->
                    <!--                        </ol>-->
                    <!--                    </div>-->
                </div>
            </div><!-- /.container-fluid -->
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <!-- left column -->
                    <div class="col-md-8">
                        <!-- general form elements -->
                        <div class="card card-primary">
                            <div class="card-header">
                                <h3 class="card-title">编辑</h3>
                            </div>
                            <!-- /.card-header -->
                            <!-- form start -->
                            <form role="form" id="ajaxFormEdit" method="POST" action="/admin-api/v1/operation">
                                <div class="card-body">
                                    <div class="form-group">
                                        <label class="col-sm-3 col-form-label">子系统</label>
                                        <select name="system_id" id="system_id"
                                                class="form-control auto-complete auto-ref"
                                                data-dft=""
                                                data-dft-option="&lt;option value=&#x27;0&#x27;&gt;全部&lt;/option&gt;"
                                                data-url="/admin-api/v1/subsystem"
                                                data-ref-ele="menu_id"
                                                data-name="name" data-value="id">
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <label for="menu_id">上级菜单</label>
                                        <select name="menu_id" id="menu_id"
                                                class="form-control"
                                                data-dft=""
                                                data-dft-option="&lt;option value=&#x27;0&#x27;&gt;全部&lt;/option&gt;"
                                                data-url="/admin-api/v1/menu_options"
                                                data-name="name" data-value="id">
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <label for="name">名称</label>
                                        <input name="name" type="text" id="name" class="form-control"
                                               placeholder="">
                                    </div>
                                    <div class="form-group">
                                        <label for="code">code</label>
                                        <input name="code" type="text" id="code" class="form-control"
                                               placeholder="">
                                    </div>
                                    <div class="form-group">
                                        <label for="status">状态</label>
                                        <select id="status" name="status" class="form-control auto-complete"
                                                data-dft="/"
                                                data-url="/admin-api/v1/enum_options?name=status"
                                                data-name="name" data-value="value">
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <label for="order_no">order_no</label>
                                        <input name="order_no" type="text" id="order_no" class="form-control"
                                               placeholder="">
                                    </div>
                                </div>
                                <!-- /.card-body -->

                                <div class="card-footer">
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </div>
                            </form>
                        </div>
                        <!-- /.card -->

                    </div>
                </div>
                <!-- /.row -->
            </div><!-- /.container-fluid -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <footer class="main-footer">

    </footer>

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
    </aside>
    <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->

<script src="../AdminLTE-3.0.5/plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../AdminLTE-3.0.5/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- AdminLTE App -->
<script src="../AdminLTE-3.0.5/dist/js/adminlte.min.js"></script>

<script src="../static/plugins/jquery.form.js"></script>
<script src="../static/plugins/jquery-tmpl/jquery.tmpl.js"></script>
<script id="sidebar-level-1" type="text/x-jquery-tmpl">
  {{if $data.child}}
  <li class="nav-item has-treeview">
    <a href="${uri}" class="nav-link">
      <i class="nav-icon fas fa-tree"></i>
      <p>
        ${name}
        <i class="right fas fa-angle-left"></i>
      </p>
    </a>
    <ul class="nav nav-treeview">
      {{tmpl($data.child) '#sidebar-level-1'}}
    </ul>
  </li>
  {{else}}
  <li class="nav-item">
    <a href="${theme_uri}" class="nav-link">
      <i class="nav-icon far fa-circle"></i>
      <p>
        ${name}
      </p>
    </a>
  </li>
  {{/if}}

</script>
<link rel="stylesheet" href="../static/plugins/jquery-toast-plugin-1.3.2/dist/jquery.toast.min.css">
<script src="../static/plugins/jquery-toast-plugin-1.3.2/dist/jquery.toast.min.js"></script>
<script src="../static/js/admin.common.js"></script>
<script>
    window.sideBarPath = "/themes/default/opera/list.html"
    let sourceUrl = window.location.origin + "/admin-api/v1/operation";

    loadContent(sourceUrl + "/" + getSearchId())
</script>

</body>
</html>
